package com.zqxq.lottery.api.controller;

import com.zqxq.common.constant.Result;
import com.zqxq.lottery.api.feign.LotteryServerFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(value = "签到接口",tags = "签到接口")
@RestController
@Slf4j
@RequestMapping(value = "/sign", produces = "application/json")
public class SignController {
    @Autowired
    private LotteryServerFeignClient lotteryServerFeignClient;
    @ApiOperation("签到领奖励")
    @PostMapping("/signReward")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户ID", paramType = "query", dataType = "Long", required = true)
    })
    public Result signReward(Long userId){
        return lotteryServerFeignClient.signReward(userId);
    }
}
